Learn R Programming

easyRNASeq (version 2.8.2)

easyRNASeq AnnotParam constructor: AnnotParam constructor

Description

This constructs a AnnotParam object. The datasource parameter (see details) is mandatory, however other parameters, i.e. when the datasource is not a GRanges or RangedData default to "genes" and gff3", indicating that the datasource is in the gff3 format and that the contained information needs to be grouped by "genes". This representing the most common use case. Hence, it is left to the user to refine the parameters accordingly to the annotation he is providing or whishes to retrieve.

Usage

## S3 method for class 'character':
AnnotParam(datasource = character(0), type = c("gff3",
  "biomaRt", "gtf", "rda"))

Arguments

datasource
a character or a RangedData or a GRanges object. See details.
type
one of NULL, biomaRt, gff3, gtf or rda. Default to NULL. See details.

Details

Note that calling the constructor without argument fails, as the datasource is a mandatory parameter. Calling the constructor with additional (not all) parameters will affect the value of the selected parameters, leaving the other parameters unaffected. There are three parameters for an AnnotParam object:
  • datasource
{If no type is provided, the datasource should be either a GRanges(prefered) or a RangedData (subject to future deprecation) object containing the genic information. These can be obtained using the getAnnotation function.} type{One of biomaRt, gff3, gtf or rda. The default is "gff3". In all cases, the datasource is a character describing:
  • For biomaRt, the name of the organism as known by the ensembl Mart,e.g.dmelanogaster or hsapiens.
  • For gff3, gtf or rda, the filename (including the full or relative path).
}

See Also

Examples

Run this code
## create an object to retrieve annotation from biomaRt
annotParam <- AnnotParam(datasource="Hsapiens",type="biomaRt")

## get the datasource and type
datasource(annotParam)
type(annotParam)

## create an object to retrieve annotation from an rda object
library(RnaSeqTutorial)
annotParam <- AnnotParam(datasource=system.file(
  package="RnaSeqTutorial",
  "data","gAnnot.rda"
),type="rda")

Run the code above in your browser using DataLab